class ValidatorMarketRegion { 
    static async cuMarketRegion(v) { 
        console.log('MarketRegion验证器',v)
        if (!v.name) { 
            throw new global.errs.ParameterException('name必填')
        }
        if (/[^-\w\d\u4e00-\u9fa5]+/ig.test(v.name)) { 
            throw new global.errs.ParameterException('仅限数字,中英文,-')
        }
        console.log('MarketRegion验证器全员通过')
    }

    static async rdMarketRegion(marketRegionId) {   
        if (isNaN(marketRegionId)) {
            throw new global.errs.ParameterException('marketRegionId应为number类型')
        }
    }
}

module.exports=ValidatorMarketRegion